#coding=utf-8
import re

'''
' [单行]2.3_2 宏定义的数学运算要用括号包起来
'''
def mzcc_udrule_sin2_3__2(lineContext):

    # 过滤不含define的行
    results = re.findall(r"#define", lineContext.curLine);
    if 0 == len(results):
        return True;

    # 过滤有()的行
    results = re.findall(r"\(|\)", lineContext.curLine);
    if 0 != len(results):
        return True;

    results = re.findall(r"\+|-|\*|/|&|\||~|\^|>|<", lineContext.curLine);
    if 0 != len(results):
        return False;
    else:
        return True;
